home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / machserver / 1.098 / dev / sun4c.md / devSCSIC90Mach.h < prev    next >
C/C++ Source or Header  |  1991-08-02  |  2KB  |  68 lines

  1. /* 
  2.  * devSCSIC90Mach.h --
  3.  *
  4.  *    Def'ns specific to the SCSI NCR 53C9X Host Adaptor which
  5.  *    depend on the machine architecture.
  6.  *
  7.  * Copyright 1991 Regents of the University of California
  8.  * Permission to use, copy, modify, and distribute this
  9.  * software and its documentation for any purpose and without
  10.  * fee is hereby granted, provided that the above copyright
  11.  * notice appear in all copies.  The University of California
  12.  * makes no representations about the suitability of this
  13.  * software for any purpose.  It is provided "as is" without
  14.  * express or implied warranty.
  15.  *
  16.  *$Header: /sprite/src/kernel/dev/sun4c.md/RCS/devSCSIC90Mach.h,v 1.1 91/08/01 21:50:29 mottsmth Exp $ SPRITE (Berkeley)
  17.  */
  18.  
  19. #ifndef _DEVSCSIC90MACH
  20. #define _DEVSCSIC90MACH
  21.  
  22. #include "devAddrs.h"
  23.  
  24. /* Board offsets of the dma and scsi registers accessed directly by driver */
  25. typedef struct DMARegs {
  26.     unsigned int    ctrl;    /* Control/status register. */
  27.     unsigned int    addr;    /* Address register. */
  28.     unsigned int    count;    /* Byte count register. */
  29.     unsigned int    diag;    /* Diagnostic register. */
  30. } DMARegs;
  31.  
  32. extern volatile DMARegs    *dmaRegsPtr;
  33.  
  34. /* Format of DMA Control/Status register */
  35. #define    DMA_DEV_ID_MASK        0xF0000000    /* Device ID bits. */
  36. #define    DMA_TERM_CNT        0x00004000    /* Byte counter has expired. */
  37. #define    DMA_EN_CNT        0x00002000    /* Enable byte count reg. */
  38. #define    DMA_BYTE_ADDR        0x00001800    /* Next byte number. */
  39. #define    DMA_REQ_PEND        0x00000400    /* Request pending. */
  40. #define    DMA_EN_DMA        0x00000200    /* Enable DMA. */
  41. #define    DMA_READ        0x00000100    /* 0==WRITE. */
  42. #define    DMA_RESET        0x00000080    /* Like hardware reset. */
  43. #define    DMA_DRAIN        0x00000040    /* Drain remaining pack regs. */
  44. #define    DMA_FLUSH        0x00000020    /* Force pack cnt, err, to 0. */
  45. #define    DMA_INT_EN        0x00000010    /* Enable interrupts. */
  46. #define    DMA_PCK_CNT        0x00000006    /* # of bytes in pack reg. */
  47. #define    DMA_ERR_PEND        0x00000002    /* Error pending. */
  48. #define    DMA_INT_PEND        0x00000001    /* Interrupt pending. */
  49.  
  50. /*
  51.  * MAX_SCSIC90_CTRLS - Maximum number of SCSIC90 controllers attached to the
  52.  *             system. Right now I set this to 1, since we'll just
  53.  *             use the default built-in on-board slot.
  54.  */
  55. #define    MAX_SCSIC90_CTRLS    1
  56.  
  57. #define CLOCKCONV 4
  58.  
  59. extern int    dmaControllerActive;
  60.  
  61. /* parameter x is unused in the sun4c implementation */
  62. #define FLUSH_BYTES(x,y,z)  VmMach_FlushByteRange((y), (z))
  63.  
  64. /* EMPTY_BUFFER is NULL in the sun4c implementation */
  65. #define EMPTY_BUFFER() ;
  66.  
  67. #endif
  68.